package ru.nosport.matrixaria.modules.core.rmh;

import ru.nosport.matrixaria.core.MessageHandlerException;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * User: vfabr
 * Date: 25.10.2006
 * Time: 14:55:41
 *
 */
public interface RMHServer extends Remote {

	/**
	 * Basic exported call method.
	 *
	 * @param _name Object instance name
	 * @param _method Method name to be called
	 * @param _params Array of method parameters
	 *
	 * @return Result of method execution
	 *
	 * @throws RemoteException if communication failure occured
	 * @throws MessageHandlerException if execution failure occured
	 */
	public Object rmhCall(String _name, String _method, Object[] _params) throws RemoteException, MessageHandlerException;
	public Object rmhCall(int _senderId, int _requestId, String _name, String _method, Object[] _params) throws RemoteException, MessageHandlerException;	
}
